package localtime01;

import java.time.LocalTime;

/*
* 3.计算和判断功能
 *   LocalTime plusHours(long hoursToAdd)//在原有时间基础上加指定小时数
 *   boolean isBefore(LocalTime other) // 判断 调用isBefore方法的LocalTime对象中封装的时间 是否在 传入的时间的前面
 *                                    //如果在前面,返回 true,否则返回false
 * */
public class LocalTimeDemo03 {
    public static void main(String[] args) {
        LocalTime now = LocalTime.now();
        System.out.println(now);     // 22:55:44.602249800

        System.out.println(now.plusHours(3));  // 01:56:46.455796

        LocalTime now2 = LocalTime.of(13, 10, 10);
        System.out.println(now2); // 13:10:10
        System.out.println(now.isBefore(now2)); // false
    }
}
